package optimizers.ganeat.triangleup;

import java.util.Map;

import fitness.Fitness;
import fitness.TriangleUpFitness;

import optimizers.commons.RunConfig;
import optimizers.ganeat.Connection;
import optimizers.ganeat.Constants;
import optimizers.ganeat.GA;
import optimizers.ganeat.Individual;
import optimizers.ganeat.Node;
import optimizers.ganeat.bistableswitch.IndividualBistableSwitch;

public class GATriangleUp extends GA {
	public GATriangleUp(RunConfig config) {
		super(config);
		// TODO Auto-generated constructor stub
	}

	@Override
	public Individual getInitialIndividual() {
		IndividualTriangleUp indiv = new IndividualTriangleUp(innovations,
				nodeNames, -1, 0, config);
		indiv.nodeGenes.add(new Node("a", 50, 20, Node.SIMPLE_SEQUENCE));
		indiv.addConnection(indiv.getNode("a"), indiv.getNode("a"), true, 20);
		return indiv;
	}

	@Override
	public Individual getNewIndividual(Map<String, Integer> innovations2,
			Map<String, String> nodeNames2, int i, int j) {
		return new IndividualTriangleUp(innovations2, nodeNames2, i, j, config);
	}

	@Override
	public String getProblemName() {
		// TODO Auto-generated method stub
		return "TriangleUp";
	}
}
